home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0429.dms / q0429.adf / libray / libcommon / Makefile.SH < prev    next >
Makefile  |  1992-05-20  |  2KB  |  61 lines

  1. case $CONFIG in
  2. '')
  3.     if test ! -f config.sh; then
  4.     ln ../config.sh . || \
  5.     ln ../../config.sh . || \
  6.     ln ../../../config.sh . || \
  7.     (echo "Can't find config.sh."; exit 1)
  8.     fi
  9.     . config.sh
  10.     ;;
  11. esac
  12. : This forces SH files to create target in same directory as SH file.
  13. : This is so that make depend always knows where to find SH derivatives.
  14. case "$0" in
  15. */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  16. esac
  17. echo "Extracting libcommon/Makefile (with variable substitutions)"
  18. : This section of the file will have variable substitutions done on it.
  19. : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
  20. : Protect any dollar signs and backticks that you do not want interpreted
  21. : by putting a backslash in front.  You may delete these comments.
  22. $spitshell >Makefile <<!GROK!THIS!
  23. OPTIMIZE = $optimize
  24. CCFLAGS = $ccflags $large
  25. RANLIB = $ranlib
  26. CC = $cc
  27. MKDEP = $mkdep
  28.  
  29. !GROK!THIS!
  30.  
  31. : In the following dollars and backticks do not need the extra backslash.
  32. $spitshell >>Makefile <<'!NO!SUBS!'
  33. LIB = ../libray.a
  34. INCLUDE = -I../..
  35. CFLAGS = $(CCFLAGS) $(INCLUDE) $(OPTIMIZE)
  36. SHELL = /bin/sh
  37.  
  38. CFILES = memory.c expr.c transform.c rotate.c sampling.c scale.c translate.c \
  39.     vecmath.c xform.c
  40. OFILES = $(CFILES:.c=.o)
  41.  
  42. $(LIB): $(OFILES)
  43.     ar cur $(LIB) $(OFILES)
  44.     $(RANLIB) $(LIB)
  45.  
  46. clean:
  47.     rm -f $(OFILES)
  48.  
  49. depend:
  50.     (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
  51.      $(MKDEP) $(CFILES) | sed 's/: \.\//: /; /\/usr\/include/d' \
  52.     ) >Makefile.new
  53.     cp Makefile Makefile.bak
  54.     cp Makefile.new Makefile
  55.     rm -f Makefile.new
  56.  
  57. # DO NOT DELETE THIS LINE
  58. !NO!SUBS!
  59. chmod 755 Makefile
  60. $eunicefix Makefile
  61.